<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script src="../plugins/crypto-js.min.js"></script>
<script>
    var key = CryptoJS.enc.Utf8.parse('0123456789abcdef'); // 128-bit key

    function encrypt(plainText) {
        var encrypted = CryptoJS.AES.encrypt(plainText, key, {
            mode: CryptoJS.mode.ECB,
            padding: CryptoJS.pad.Pkcs7
        });
        return encrypted.toString();
    }

    function decrypt(encryptedText) {
        var decrypted = CryptoJS.AES.decrypt(encryptedText, key, {
            mode: CryptoJS.mode.ECB,
            padding: CryptoJS.pad.Pkcs7
        });
        return decrypted.toString(CryptoJS.enc.Utf8);
    }

    var plainText = "Hello, 世界!";
    var encryptedText = encrypt(plainText);
    console.log("Encrypted text: " + encryptedText);

    var decryptedText = decrypt(encryptedText);
    console.log("Decrypted text: " + decryptedText);
</script>
</body>
</html>